package com.lc.cehui.ui.activity.mine;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import com.blankj.utilcode.util.LogUtils;
import com.lc.cehui.R;
import com.lc.cehui.app.AppActivity;
import com.luck.picture.lib.PictureSelector;
import com.luck.picture.lib.config.PictureConfig;
import com.luck.picture.lib.entity.LocalMedia;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AccountNumberActivity extends AppActivity {
    @BindView(R.id.et_name)
    EditText etName;
    @BindView(R.id.et_people)
    EditText etPeople;
    @BindView(R.id.tv_phone)
    EditText tvPhone;
    @BindView(R.id.tv_vx)
    EditText tvVx;
    @BindView(R.id.tv_address)
    EditText tvAddress;
    @BindView(R.id.img_yingyezhizhao)
    ImageView imgYingyezhizhao;
    @BindView(R.id.img_qitazizhi)
    ImageView imgQitazizhi;
    @BindView(R.id.tv_leixing)
    EditText tvLeixing;
    @BindView(R.id.bt_submit)
    Button btSubmit;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_accountnumber;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.img_yingyezhizhao, R.id.img_qitazizhi, R.id.bt_submit})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.img_yingyezhizhao:
                showAlbum(PictureConfig.CHOOSE_REQUEST);
                break;
            case R.id.img_qitazizhi:
                showAlbum(PictureConfig.CHOOSE_REQUEST);
                break;
            case R.id.bt_submit:
                break;
        }
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK) {
            switch (requestCode) {
                case PictureConfig.CHOOSE_REQUEST:
                    // 结果回调
                    List<LocalMedia> result = PictureSelector.obtainMultipleResult(data);
                    LogUtils.e(result);
//                    insertImg(result.get(0).getCutPath());
                    break;
                default:
                    break;
            }
        }
    }
}
